<div class="card ">
  <div class="card-body">
    <a href="{% route 'topics.create' %}" class="btn btn-success btn-block" aria-label="Left Align">
      <i class="fas fa-pencil-alt mr-2"></i>  新建帖子
    </a>
  </div>
</div>

{% if active_users %}
  <div class="card mt-4">
    <div class="card-body active-users pt-2">
      <div class="text-center mt-1 mb-0 text-muted">活跃用户</div>
      <hr class="mt-2">
      {% for u in active_users %}
        <a class="media mt-2" href="{% route 'users.show' u.ID %}">
          <div class="media-left media-middle mr-2 ml-1">
            <img src="{{ u.Avatar }}" width="24px" height="24px" class="media-object">
          </div>
          <div class="media-body">
            <small class="media-heading text-secondary">{{ u.Name }}</small>
          </div>
        </a>
      {% endfor %}
    </div>
  </div>
{% endif %}

{% if links %}
  <div class="card mt-4">
    <div class="card-body pt-2">
      <div class="text-center mt-1 mb-0 text-muted">资源推荐</div>
      <hr class="mt-2 mb-3">
      {% for l in links %}
        <a class="media mt-1" href="{{ l.Link }}">
          <div class="media-body">
            <span class="media-heading text-muted">{{ l.Title }}</span>
          </div>
        </a>
      {% endfor %}
    </div>
  </div>
{% endif %}
